<?php 
$urlImg = PUBLIC_URL .'/img/product/';
?>
<?php 
if(count($this->Items) > 0){
	foreach ($this->Items as $val) {
		$lnkDetail = $this->url(array('module'=>'default','controller'=>'detail','action'=>'product','name'=>Zendvn_Filter_Remove::filterSEO($val['name']),'id'=>$val['id']),'detail_pro',true);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td width="35" height="16" align="right" valign="bottom"><img src="images/box/top_left.png" width="35" height="33" /></td>
            <td height="16" valign="bottom" class="top">&nbsp;</td>
            <td width="31" height="16" valign="bottom"><img src="images/box/top_right.png" width="31" height="33" /></td>
          </tr>
          <tr>
            <td align="right" class="left">&nbsp;</td>
            <td bgcolor="#FFFFFF">
            		<div class='product' style="font-size: 12px;">
            			<div>
            			<a href="<?php echo $lnkDetail;?>"><img src="<?php echo $urlImg . $val['picture'];?>" width="400" height="220" align="left"/></a>
	            		<a style="text-decoration: none;" href="<?php echo $lnkDetail;?>"><strong><?php echo $val['name'];?></strong></a>
	            		</br><div style="margin-left:420px;"><li>Bảo Hành : <?php echo $val['warranty'];?></li>            		
            			<?php 
            			if($val['selloff'] == 0){
							echo '<li style="color:red;">Giá : '. number_format($val['price'],0,".",".") . '</li>';
            			}else{
            				echo '<li style="text-decoration: line-through;color:black;">Giá : '. number_format($val['price'],0,".",".") .
            					 '</li>' . '<li style="color:red;">Khuyến mãi : ' . number_format($val['selloff'],0,".",".") . '</li>';
            				echo '</li>';
            			}
            				
            			?>
            			<li><?php echo $val['promotion'];?></li></div>            			
            			<br><a class="button" href="<?php echo $lnkDetail;?>">Chi tiết</a>
            			</div>
            			<div style="clear: both;"></div></br>
            			<div style="clear: both;text-align: justify;">
            				<?php echo $val['intro'];?>
            			</div>
            		</div>
            </td>
            <td class="right">&nbsp;</td>
          </tr>
          <tr>
            <td width="35" align="right" valign="top"><img src="images/box/bottom_left.png" width="35" height="32" /></td>
            <td valign="top" class="bottom">&nbsp;</td>
            <td valign="top"><img src="images/box/bottom_right.png" width="31" height="32" /></td>
          </tr>
</table>
<?php
	}
}else{
	echo "Chưa có sản phẩm nào";
} ?>